package org.example.ch02.p65;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num,max=Integer.MIN_VALUE,count=0;
        while(scanner.hasNext() ){
                num = scanner.nextInt();
                if (num == 0) {
                    break;
                }
                if (num > max) {
                    max = num;
                    count = 1;
                } else if (num == max) {
                    count++;
                }
            if (num==0){
                break;
            }
        }
        System.out.printf("The largest number is %d\n",max);
        System.out.printf("The occurrence count of the largest number is %d\n",count);
        scanner.close();
    }
}
